import request from '@/utils/request'

// 查询户型图管理列表
export function listHousediagram(query) {
  return request({
    url: '/diagram/housediagram/list',
    method: 'get',
    params: query
  })
}

// 查询户型图管理详细
export function getHousediagram(id) {
  return request({
    url: '/diagram/housediagram/' + id,
    method: 'get'
  })
}

// 新增户型图管理
export function addHousediagram(data) {
  return request({
    url: '/diagram/housediagram',
    method: 'post',
    data: data
  })
}

// 修改户型图管理
export function updateHousediagram(data) {
  return request({
    url: '/diagram/housediagram',
    method: 'put',
    data: data
  })
}

// 删除户型图管理
export function delHousediagram(id) {
  return request({
    url: '/diagram/housediagram/' + id,
    method: 'delete'
  })
}

// 导出户型图管理
export function exportHousediagram(query) {
  return request({
    url: '/diagram/housediagram/export',
    method: 'get',
    params: query
  })
}
export function fileUpload(formData) {
  console.log(formData)
  return request({
    url: '/common/upload-batch',
    method: 'post',
    data: formData
  })
}
export function fileUploadOne(formData) {
  console.log(formData)
  return request({
    url: '/file/upload',
    method: 'post',
    data: formData
  })
}
// 批量新增户型图管理
export function batchAdd(params) {
  return request({
    url: '/diagram/housediagram/batchAdd',
    method: 'post',
    data: params
  })
}